using System;
using System.Collections.Generic;
using System.Text;
using Terminal.Advanced_AEUC_settings_controls.Settings_AUX;

namespace Terminal.Advanced_AEUC_settings_controls.Settings_Interfaces
{
    /// <summary>
    /// Interface describing the general AEUC setting behaviour model
    /// </summary>
    public interface IAEUCSetting
    {
        /// <summary>
        /// Primary value of the setting
        /// </summary>
        Int64 AEUC_Val
        {
            get;
            set;
        }
        /// <summary>
        /// Optional value of the setting
        /// </summary>
        Int64 AEUC_OptVal
        {
            get;
            set;
        }
        /// <summary>
        /// Default value
        /// </summary>
        Int64 AEUC_Default
        {
            get;
            set;
        }
        /// <summary>
        /// Minimum possible value
        /// </summary>
        Int64 AEUC_Min
        {
            get;
            set;
        }
        /// <summary>
        /// Maximum possible value
        /// </summary>
        Int64 AEUC_Max
        {
            get;
            set;
        }
        /// <summary>
        /// AEUC setting Id
        /// </summary>
        uint AEUC_Id
        {
            get;
            set;
        }
        /// <summary>
        /// AEUC setting size
        /// </summary>
        uint AEUC_Size
        {
            get;
            set;
        }
        /// <summary>
        /// Setting availability
        /// </summary>
        bool AEUC_Enabled
        {
            get;
            set;
        }
        /// <summary>
        /// Reference pointer
        /// </summary>
        bool AEUC_RefPointer
        {
            get;
            set;
        }
        /// <summary>
        /// Whether this control is state sensitive
        /// </summary>
        bool AEUC_SupportStateSense
        {
            get;
            set;
        }
        /// <summary>
        /// Set control's state as changed
        /// </summary>
        void AEUC_SetStateChange(bool do_itter);
        /// <summary>
        /// Reset the control's state to initial value
        /// </summary>
        void AEUC_ResetToDefault();
        /// <summary>
        /// Gets an AEUC-setting based on the current control settings
        /// </summary>
        /// <returns>A generic AEUC-Setting representation</returns>
        GenAEUCSetting AEUC_GetSetting();
        /// <summary>
        /// Indicates whether this control is part of a linked setting chain
        /// </summary>
        bool AEUC_LinkedSetting
        {
            get;
            set;
        }
        /// <summary>
        /// Get or set the next setting in the chain link
        /// </summary>
        IAEUCSetting AEUC_NextSettingLink
        {
            get;
            set;
        }
        /// <summary>
        /// Get or set the link setting chain type: bitfield or stuffing
        /// </summary>
        int AEUC_SettingChainType
        {
            get;
            set;
        }
        /// <summary>
        /// Recursive itteration in the linked group to obtain a composite value
        /// </summary>
        /// <returns>Integer value</returns>
        Int64 AEUC_LinkValueAgregation();
        /// <summary>
        /// Recursive itteration in the linked group to set a composite value
        /// </summary>
        /// <returns>Integer value</returns>
        void AEUC_LinkValueSetValue(Int64 l_val);
        /// <summary>
        /// Get or set the auxiliary status of the control
        /// </summary>
        bool AEUC_AUXSetting
        {
            get;
            set;
        }
        /// <summary>
        /// Get or set the control linked to the primary value of this auxiliary setting
        /// </summary>
        IAEUCSetting AEUC_SettingPrimaryLink
        {
            get;
            set;
        }
        /// <summary>
        /// Get or set the control linked to the secondary value of this auxiliary setting
        /// </summary>
        IAEUCSetting AEUC_SettingSecondaryLink
        {
            get;
            set;
        }
        /// <summary>
        /// Restore the setting value to its shadowed copy
        /// </summary>
        void AEUC_RestoreShadowedValue();
        /// <summary>
        /// Update the shadowed copy of a setting to its new value
        /// </summary>
        void AEUC_UpdateShadowedValue();
        /// <summary>
        /// Get or set the use of shadowed copy for this settig
        /// </summary>
        bool AEUC_ShadowedValue
        {
            get;
            set;
        }
        /// <summary>
        /// Get or set the display string of the control
        /// </summary>
        string AEUC_DisplayName
        {
            get;
            set;
        }
        /// <summary>
        /// When the control array is deserialized from a stream, this function will set the appropirate control links
        /// </summary>
        /// <returns>True if the operation completed successfully</returns>
        bool AEUC_SetLinkInitialization();
        /// <summary>
        /// Returns the reference to the valid AEUC setting object
        /// </summary>
        /// <returns>vali AEUC setting object</returns>
        IAEUCSetting AEUC_GetLinkReference();
    }
}
